package com.li.test.base;

public class NonameClass {
    public static void main(String[] args) {
        // 静态内部类
        StaticInnerClass staticInnerClass = new StaticInnerClass();
        // 成员内部类
        InnerClass innerClass = new NonameClass().new InnerClass();
        // 方法内部类，生命周期指在方法内
        Object o = method();
        // 匿名内部类
        MyInterface myInterface = new MyInterface() {};
    }

    static class StaticInnerClass{

    }

    class InnerClass{

    }

    public static Object method(){
        class MethodInnerClass{

        }

        return new MethodInnerClass();

    }
}

interface MyInterface{

}

